﻿@model IEnumerable<RIS.TMP.WEB.APP.Models.UserLogin>

@{
    ViewBag.Title = "กำหนดสิทธิ : ลงทะเบียน";
}
@section Settings{
    <h2 class="sub-header">ลงทะเบียน</h2>

    <p>
        @Html.ActionLink("Create New", "Create", new object { }, new { @class = "btn btn-primary" })
    </p>
    <div class="table-responsive">
        <table id="table" class="table table-striped table-bordered table-hover" aria-describedby="table_info">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.User)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Password)
                    </th>
                    <th>
                        @Html.DisplayName("ผู้ใช้งาน")
                    </th>
                    <th class="center" style="width: 200px;"></th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.User)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Password)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.CFEmployee.FirstName_Th)
                        </td>
                        <td>
                            @Html.ActionLink("Edit", "Edit", new { id = item.IdLogin }) |
                            @Html.ActionLink("Details", "Details", new { id = item.IdLogin }) |
                            @Html.ActionLink("Delete", "Delete", new { id = item.IdLogin })
                        </td>
                    </tr>
                }
            </tbody>
        </table>
        </div>
}
@section scripts {
    @Scripts.Render("~/Scripts/jquery.dataTables.min.js")
    @Scripts.Render("~/Scripts/dataTables.bootstrap.js")
    @*@Scripts.Render("~/Scripts/css/dataTables.bootstrap.css")*@
    <script type="text/javascript">
        $(".AF").show();
        $(document).ready(function () {
            $('#table').dataTable({
                "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>"
            });
        });

        $.extend($.fn.dataTableExt.oStdClasses, {
            "sWrapper": "dataTables_wrapper form-inline"
        });
    </script>
}